#include "dkglFixedPoint16.h"

using namespace std;

namespace DKGL
{

FixedPoint16::FixedPoint16(float f)
{
	m_overflow = false;
	
	if(f> 127.0f )
	{
		m_overflow = true;
		m_wholePart = 127;
	}
	else if( f< -128.0f )
	{
		m_overflow = true;
		m_wholePart = -128;
	}
	else
	{
		m_wholePart = static_cast<char>(f);
	}
}

FixedPoint16::FixedPoint16(int d)
{

}

float FixedPoint16::toFloat()
{
	return 0.0f;
}

int FixedPoint16::toInt()
{
	return 0;
}

}